import {
    createStore,
    useStore
} from "vuex"




// useStore().dispatch("")

export default createStore({
    state: {
        count: 0
    },
    actions: {
        addCount({ commit, state }) {
            commit("ADDCOUNT",state)
        }
    },
    mutations: {
        ADDCOUNT(state) {
            state.count++
        }
    },
    getters: {
        isEvenOrOdd(state) {
            return state.count % 2 === 0 ? "偶数" : "奇数"
        }
    },
    modules:{
        
    }
})